home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9325 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: newsfeed.internetmci.com!panix!cmcl2!news!schonberg!dewar
  2. From: dewar@cs.nyu.edu (Robert Dewar)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 29 Feb 1996 19:35:29 -0500
  6. Organization: Courant Institute of Mathematical Sciences
  7. Message-ID: <dewar.825640041@schonberg>
  8. References: <JSA.96Feb16135027@organon.com> <4gaa6l$8mk@post.gsfc.nasa.gov> <4gd94r$isu@mack.rt66.com> <1996Feb22.005518.13396@leeweyr.sccsi.com> <4gvrffINNlqo@anvil.ugrad.cs.ubc.ca> <4h4j31$1ga3@watnews1.watson.ibm.com>
  9. NNTP-Posting-Host: schonberg.cs.nyu.edu
  10. X-Newsreader: NN version 6.5.0 (NOV)
  11.  
  12. "|> And it should certainly not be written in some poorly standardized language,
  13. |> for which no two implementations are in agreement. C is governed by an
  14. |> ISO standard, which, if adhered to, lets a strictly conforming program
  15. |> translated by a strictly conforming implementation yield well-defined results
  16. .
  17. |>
  18. |> I don't think you can say the same for Ada or C++."
  19.  
  20. (a) this reveals quite a lack of knowledge of Ada, which had a standard
  21. *before* anyone started using it, and to which all compilers conformed
  22. faithfully.
  23.  
  24. (b) C is actually not in such good shape here, although the ANSI standard
  25. has been out for quite a while, the compliance with this standard is stlil
  26. by no means universal. For example, just a few months ago, I wrote soe
  27. code using the standard which used the returned value from sprintf. It
  28. worked fine on OS/2, but bombed on SunOS, whose C compiler library does
  29. something non-standard. OK, this sort of thing happens, but it was the
  30. response of our local "C expert" that I found interesting, I was told
  31. "everyone knows that you should not use the returned value of sprintf
  32. if you are writing portable code". Of course the situation gets better
  33. here with time, and finally the ANSI C standard is starting to have some
  34. force.
  35.  
  36. (c) C is much less hostile to extensions than Ada (to validate Ada you have
  37. to sign a declaration that you have not implemented any extensions). What
  38. this means in practice is that you have to be more careful in C not to
  39. wander off into these extensions
  40.  
  41. There are many fronts to argue this general point on, but I am afraid you
  42. have, through not knowing Ada well, wandered into an area where Ada has
  43. very definitely got the upper hand (C++ is of course another matter entirely :-)
  44.  
  45.